#include "utils.h"

#define KEY_LENGTH 2048
/*
 * 1.即使明文、加密密钥相同，每次加密也应该产生不同的密文
 *
 * 
 * 
 */

class rsa_algorithm
{
private:
    std::string public_key, private_key;

public:
    rsa_algorithm();
    ~rsa_algorithm();
    bool generate_rsa_key();
    std::string encrypt_by_public_key(std::string &plaintext);
    std::string encrypt_by_private_key(std::string &plaintext);
    std::string decrypt_by_public_key(std::string &cyphertext);
    std::string decrypt_by_private_key(std::string &cyphertext);
    
};